package anish.lab6;

public class Ticket {
	int startPoint;
	int endPoint;
	int ticketAmount;

	public Ticket() {
		startPoint = 2;
		endPoint = 18;
	}

	public Ticket(int start, int end) {
		startPoint = start;
		endPoint = end;
	}

	public int getStartPont() {
		return startPoint;
	}

	public int getEndPoint() {
		return endPoint;
	}

	public int getTicketAmount() {
		return ticketAmount;

	}

	public boolean validateTravelPoints() {
		if (startPoint > 0 && endPoint > startPoint) {
			return true;
		} else
			return false;
	}

	public void calculateTicketAmt() {
		ticketAmount = (endPoint - startPoint) * 20;

	}
}
